#ifndef CONFIGURATION_H
#define CONFIGURATION_H

#include <QObject>

class Configuration : public QObject
{
    Q_OBJECT
public:
    explicit Configuration( QObject *parent = NULL );
    ~Configuration();
    
    /**
     * @return Path to the alarm sound file.
     */
    QString alarmSoundPath() const;

    /**
     * @return The check interval in minutes.
     */
    int checkInterval() const;

    /**
     * @brief Load configuration.
     */
    void load();

    /**
     * @return If true an alarm sound should be played.
     */
    bool playSound() const;

    /**
     * @brief Save configuration.
     */
    void save();

    /**
     * @param alarmSoundPath Path to the alarm sound file.
     */
    void setAlarmSoundPath( const QString &alarmSoundPath );

    /**
     * @param checkInterval The check interval in minutes.
     */
    void setCheckInterval( int checkInterval );

    /**
     * @param playSound If true an alarm sound should be played.
     */
    void setPlaySound( bool playSound );

    /**
     * @param showPopup If true an alarm popup should be showed.
     */
    void setShowPopup( bool showPopup );

    /**
     * @return If true an alarm popup should be showed.
     */
    bool showPopup() const;

signals:
    
public slots:

private:
    QString mAlarmSoundPath;
    int mCheckInterval;
    bool mPlaySound;
    bool mShowPopup;
};

#endif // CONFIGURATION_H
